<template>
  <header class="todo-header">
    <h1>{{ title }}</h1>
    <div class="repo-link">
      <a href="https://gitee.com/consider-the-line/todolist-vue3" target="_blank">查看源码</a>
    </div>
  </header>
</template>

<script setup>
const props = defineProps({
  title: {
    type: String,
    default: '我的待办事项'
  }
})
</script>

<style scoped>
.todo-header {
  text-align: center;
  margin-bottom: 20px;
}

.todo-header h1 {
  color: #42b983;
  font-size: 32px;
  margin: 0;
  padding: 15px 0;
}

.repo-link {
  margin-top: 10px;
}

.repo-link a {
  color: #42b983;
  text-decoration: none;
  font-size: 14px;
  padding: 5px 10px;
  border: 1px solid #42b983;
  border-radius: 4px;
  transition: all 0.3s;
}

.repo-link a:hover {
  background-color: #42b983;
  color: white;
}
</style> 